<?php

use Illuminate\Database\Seeder;

class PaymentsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        \Illuminate\Support\Facades\DB::table('payments')->truncate();
        \Illuminate\Support\Facades\DB::table('payments')->insert([
            [
                'payment_id' => PAYMENT_ID_WXPAY,
                'payment_name' => '微信支付',
                'payment_key' => 'wxpay',
                'icon' => '',
                'payment_info' => serialize([
                    //公众号id
                    'wxAppId' => 'wx2d3960047c6f754f',
                    //商户号
                    'wxMchId' => '1603749962',
                    //商户key
                    'wxkey' => '19940822Yhshenhaijiyuan2020D1015',
                    'cert_path' => base_path('zc/wxpay_apiclient_cert.pem'),//微信支付密钥文件地址
                    'key_path' => base_path('zc/wxpay_apiclient_cert.pem'),//微信支付密钥文件地址
                    'notify_url' => env('APP_URL') . '/wxnotify',//微信支付回调
                    'notify_refund_url' => env('APP_URL') . '/wxnotify_refund',//微信退款回调

                ])
            ]
            // [
            //     'payment_id' => PAYMENT_ID_WXPAY_MINI,
            //     'payment_name' => '微信小程序支付',
            //     'payment_key' => 'wxpay_mini',
            //     'icon' => '',
            //     'payment_info' => serialize([
            //         //小程序id
            //         'wxAppId' => '',
            //         //商户号
            //         'wxMchId' => '',
            //         //商户key
            //         'wxkey' => '',
            //         'cert_path' => '',//小程序支付密钥文件地址
            //         'key_path' => '',//小程序支付密钥文件地址
            //         'notify_url' => env('APP_URL') . '/wxnotify_mini',//小程序支付回调
            //         'notify_refund_url' => env('APP_URL') . '/wxnotify_refund',//小程序退款回调
            //     ])
            // ],
            // [
            //     'payment_id' => PAYMENT_ID_ALIPAY,
            //     'payment_name' => '支付宝',
            //     'payment_key' => 'alipay',
            //     'icon' => '',
            //     'payment_info' => serialize([
            //         'appId' => '',//商户号
            //         'private_key_path' => '',//支付宝支付密钥文件地址
            //         'public_key_path' => '',//支付宝支付密钥文件地址
            //         'notify_url' => env('APP_URL') . '/alinotify',//支付宝回调
            //     ])
            // ],
            // [
            //     'payment_id' => PAYMENT_ID_POS,
            //     'payment_name' => 'POS',
            //     'payment_key' => 'pos',
            //     'icon' => '',
            //     'payment_info' => ''
            // ],
            // [
            //     'payment_id' => PAYMENT_ID_CASH,
            //     'payment_name' => '现金',
            //     'payment_key' => 'cash',
            //     'icon' => '',
            //     'payment_info' => ''
            // ],
            // [
            //     'payment_id' => PAYMENT_ID_YINLIAN,
            //     'payment_name' => '银联',
            //     'payment_key' => 'yinlian',
            //     'icon' => '',
            //     'payment_info' => ''
            // ]
        ]);
    }
}
